﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using WPFExcelReport.Helpers; 
namespace WPFExcelReport
{
    public partial class TDVA02
    { 
        public TDVA02()
        {

            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VVAART();
            this.DataContext = MV;
            InitializeComponent();
        }
        public override void QueryCommand(object sender, RoutedEventArgs e)
        {
            dwData = TBMain.NewRow();
            dwData["VAAMANDANT"] = app.Mandant;
            SResult = TMV.QVA99(dwData);
            MergeData(SResult, false);
            base.QueryCommand(sender, e);
        }
        public  void ResetSeq(object sender, RoutedEventArgs e)
        {
            if(ART.Trim().Length==0)
            { }
            dwData = TBMain.NewRow();
            dwData["VAAMANDANT"] = app.Mandant;
            TMV.DVAART00(dwData);
            dwData = TMV.VAF.TBMain.NewRow();
            dwData["VAFMANDANT"] = app.Mandant;
            TMV.VAF.DVF00(dwData);
            dwData = TMV.VWS.TBMain.NewRow();
            dwData["WAMANDANT"] = app.Mandant;
            TMV.VWS.DWS00(dwData);
            dwData = TMV.VAF.VWF.TBMain.NewRow();
            dwData["WAFMANDANT"] = app.Mandant;
            TMV.VAF.VWF.DWAF00(dwData);   
        }
    }
}
